package com.sanploy.manage.mapper;

import com.sanploy.common.domain.SystemConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by zhu yingzhi on 2017/10/17.
 */
@Mapper
public interface  SysConfigMapper{
    @Select("SELECT * FROM sys_config")
    List<SystemConfig> getAll();

    @Select("SELECT * FROM sys_config WHERE id=#{id}")
    SystemConfig getConfigById(@Param("id") Long id);

    @Update("UPDATE sys_config SET variate_value = #{variate_value} WHERE id=#{id}")
    int editConfig(SystemConfig systemConfig);
}
